RStorage = game.ReplicatedStorage;
local sharedLibs = RStorage.SharedLibs;
local pp = require(sharedLibs.Prototype)
local co = require(sharedLibs.CoroLib)

CU = require(sharedLibs.CoUtils);
CoHelper = require(sharedLibs.CoHelper);
Signal = require(sharedLibs.Signal.Signal);
Seq = require(sharedLibs.FP.Sequence);

--[[
    所有直接通过coroutine实现的AsyncOp的基类
]]
local cls = pp.proto();

function cls:constructor(...)
	self._intervalCo = self:_onCreateCo(...);
end

--- Override it!!!
function cls:_onCreateCo(...)
	return nil;
end

--- 返回值是: 返回的那个Op的返回值, 返回的那个Op
function cls:Wait()
	return self._intervalCo:Wait();
end

---
function cls:Start()
    self._intervalCo:Start();
end

return cls;
